I am trying to exorcise the last few demons out of my controller app. One of the worst has to do with interrupting a G-code program in process. Right now, my Stop button does Interpreter.Halt(). But, this has two problems:
1) I cannot resume execution of the G-code. I can re-load the program, then start up from the line it was stopped on, but if I simply try to resume from the point where it was stopped, without re-loading the program, the interpreter simply hangs. It may, or may not, execute a single line, then just go out to lunch.
2) If I jog while stopped, then execute ANY g-code, including MDI, it will move the jogged axis back to where it was when stopped. This is HIGHLY undesirable.
I am not even a little clear on the "correct" use of Halt() and Abort() in CoordMotion and Interpreter, nor *exactly* what they do. I've tried to make sense out of the code in KMotionCNC, but it is doing things I simply don't understand, and manipulating things in the Interpreter that don't appear to me to exist in dotNet. I and cleating both Halt and Abort whenever I try to execute G-code, but that doesn't seem to help. So far, the only way I've been able to get it to work reasonably well is to do Interpreter.Initialize() after the Halt(). But, again, I have no clue exactly what this is doing.
Regards,
Ray L.
|